package controllers;

import java.util.List;

import models.Organization;

import play.mvc.Controller;
import play.mvc.With;

@With(Secure.class)
public class OrganizationsView extends Controller {

	/**
	 * view all organtizations (publicn private n joined )
	 * 
	 * 
	 */
	public static void ViewAllOrganizations() {

		Long loggedInUserID = Security.userid();
		String loggedInUserName = Security.connected();

		List org = Organization.findAll();
		render(loggedInUserID, loggedInUserName, org);

	}

	/**
	 * renders the organization view template and fills all the data including
	 * managers,creator,ideas,topics,entites
	 * 
	 * @param name
	 * @author XtarX
	 */
//	public static void OrganizationView(String name) {
//		Organization organization = Organization.find("name=?", name).first();
//		List managers = organization.managers;
//		List ideas = organization.ideas;
//		List entites = organization.liesIn;
//		List topics = organization.topics;
//		List memebers = organization.members;
//		
//		// @{UserProfile.OtherUserProfile(${})}
//		// String creatorName = organization.creator.ideaDeveloper.username;
//		render(organization, managers, ideas, entites, topics, memebers);
//	}

}
